Previous | Chapter contents | Next | Book PDF
The new document architecture in the Application Kit is based on three classes: NSDocument, NSWindowController, and NSDocumentController. NSDocument is the principal class. It represents a single document in your application. Developers must subclass NSDocument to give it knowledge of the application's model layer and to implement persistence (loading and saving). NSWindowControllers own and control the application's user interface. An NSDocument has one or more NSWindowControllers. Developers often subclass NSWindowController to add specific knowledge of the view layer that the controller is responsible for managing. NSDocumentController is a singleton class. Each document-based application has a single instance of NSDocumentController to track and manage all open documents. Developers typically don't need to subclass NSDocumentController.
Previous | Chapter contents | Next | Book PDF